package com.woniuxy.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.beans.Transient;
import java.io.Serializable;
import java.util.List;

/**
 * @ClassName Permission
 * @Description 权限关联模型
 * @Author 李磊
 * @Version 1.0
 **/
@TableName("t_permission")
public class Permission implements Serializable {

    private static final long serialVersionUID = 1L;
    /*权限关联ID*/
    @TableId(value = "permission_id", type = IdType.AUTO)
    private Integer permissionId;
    /*当前权限等级*/
    private String level;
    /*权限父等级*/
    private String plevel;
    /*权限名称*/
    private String permissionName;
    @TableField(exist = false)
    private List<Permission> children;

    public List<Permission> getChildren() {
        return children;
    }

    public void setChildren(List<Permission> children) {
        this.children = children;
    }

    public Integer getPermissionId() {
        return permissionId;
    }

    public void setPermissionId(Integer permissionId) {
        this.permissionId = permissionId;
    }

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    public String getPlevel() {
        return plevel;
    }

    public void setPlevel(String plevel) {
        this.plevel = plevel;
    }

    public String getPermissionName() {
        return permissionName;
    }

    public void setPermissionName(String permissionName) {
        this.permissionName = permissionName;
    }

    @Override
    public String toString() {
        return "Permission{" +
                "permissionId=" + permissionId +
                ", level='" + level + '\'' +
                ", plevel='" + plevel + '\'' +
                ", permissionName='" + permissionName + '\'' +
                ", children=" + children +
                '}';
    }
}
